<template>
    <header>
        <div class="header">
            <div v-if="left" class="header-action-icon" @click='$router.back()'>
                <div class="icon-fanhui"></div>
            </div>
            <div class="text">
                {{name}}
            </div>
            <div v-if="right" class="header-action-icon" @click="actionClick">
                <div class="icon-list"></div>
            </div>
        </div>
    </header>
</template>
<script>
export default {
    name: 'header',
    props: {
        name: {
            default: "",
            type: String
        },
        left: {
            default: true,
            type: Boolean
        },
        right: {
            default: true,
            type: Boolean
        }
    },
    methods: {
        actionClick() {
            this.$emit('actionClick')
        },
    }
}
</script>